package com.atguigu.gmall.item.client;

import io.swagger.annotations.ApiParam;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

import java.util.Map;

/**
 * @Author: 孙润达
 * @Date: 2022/1/9 14:40
 * fallback:降级处理
 */
@FeignClient(name = "service-item",fallback = ItemFeignClientImpl.class)
public interface ItemFeignClient {

    @GetMapping("/api/item/getItem/{skuId}")
    public Map getItem(@ApiParam(value = "库存id") @PathVariable(name = "skuId") Long skuId);
}
